#ifndef __MY_SUFFIX_TREE_H__
#define __MY_SUFFIX_TREE_H__

typedef struct suffixNode {
    // Double linked list for it children list
    struct suffixNode *children_first;
    struct suffixNode *children_last;
    struct suffixNode *next;
    struct suffixNode *parent;
    int start_pos;
    int end_pos;
    int cur_pos;

    suffixNode() {
        children_first = NULL;
        children_last = NULL;
        next = NULL;
        parent = NULL;

        start_pos = 0;
        end_pos = 0;
        cur_pos = 0;
    };
} SuffixNode;

typedef struct ActivePoint_ {
    SuffixNode *node;
    char *edge;
    int length;
    ActivePoint_() {
        node = NULL;
        edge = NULL;
        length = 0;
    };
} ActivePoint;

bool createSuffixTree(char *str, SuffixNode * &root);
bool printSuffixTree(char *str, SuffixNode *root);

#endif

